Problem: Find the smallest positive integer $n$ such that
\[\begin{pmatrix} \cos 170^\circ & -\sin 170^\circ \\ \sin 170^\circ & \cos 170^\circ \end{pmatrix}^n = \mathbf{I}.\]
The matrix
\[\begin{pmatrix} \cos 170^\circ & -\sin 170^\circ \\ \sin 170^\circ & \cos 170^\circ \end{pmatrix}\]corresponds to rotating the origin by an angle of $170^\circ$ counter-clockwise.

[asy]
unitsize(2 cm);

draw((-1,0)--(1,0));
draw((0,-1)--(0,1));
draw(arc((0,0),0.8,40,210),red,Arrow(6));
draw((0,0)--dir(40),Arrow(6));
draw((0,0)--dir(40 + 170),Arrow(6));

label("$170^\circ$", (-0.6,0.8));
[/asy]

Thus, we seek the smallest positive integer $n$ such that $170^\circ \cdot n$ is a multiple of $360^\circ.$  In other words, we want
\[170n = 360m\]for some positive integer $m.$  This reduces to
\[17n = 36m,\]so the smallest such $n$ is $\boxed{36}.$